/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Main_Gui.java
 *
 * Created on Oct 2, 2012, 1:02:07 AM
 */
package Admin;

import Bill.Bill;
import Bill.View_Product_2;
import Customer.Customer_Show;
import Product.Product_show;
import Product.View_Product_1;
import Product_Category.Product_CategoryShow;
import Staff.Change_pass1;
import Staff.Change_pass_2;
import Staff.Change_pass_3;
import Staff.Staff;
import Supplier.Supplier_Show;
import java.awt.Dimension;
import javax.swing.JLabel;

/**
 *
 * @author HP
 */
public class Main_Gui_1 extends javax.swing.JFrame {

    /** Creates new form Main_Gui */
    public Main_Gui_1() {
        initComponents();
        this.setLocationRelativeTo(null);
    }

    public void showID()
    {
        System.out.println("ID "+getStaffID());
    }
    
   
    String userName;
    
    private int staffID;

    public int getStaffID() {
        return staffID;
    }

    public void setStaffID(int staffID) {
        this.staffID = staffID;
    }
    
    public void setlable(String content){
        this.userName = content;
         lblChao.setText(this.userName);
    }
    String roles;
    public void setroles(String roles)
    {
          this.roles=roles;
          lblRoles.setText(this.roles);
          if(this.roles=="Admin")
          {
            mnInventory_Magament.setVisible(false);
            mnSales_Manager.setVisible(false);
            mnSales_person.setVisible(false);
          }
          else if(this.roles=="Sales_Manager"){
            mnInventory_Magament.setVisible(false);
            mnAdmin.setVisible(false);
            mnSales_person.setVisible(false);

          }
          else if(this.roles=="Inventory_Manager"){
            mnAdmin.setVisible(false);
            mnSales_Manager.setVisible(false);
            mnSales_person.setVisible(false);
          }
          else {
            mnInventory_Magament.setVisible(false);
            mnSales_Manager.setVisible(false);
            mnAdmin.setVisible(false);

          }
        
       
          
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jDesktopPane1 = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        lblChao = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        lblRoles = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        mnHome = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        mnAdmin = new javax.swing.JMenu();
        mnStaff_Admin = new javax.swing.JMenuItem();
        mnProduct_Admin = new javax.swing.JMenuItem();
        mnCategory_Admin = new javax.swing.JMenuItem();
        mnSupplier_Admin = new javax.swing.JMenuItem();
        mnCustomer_Admin = new javax.swing.JMenuItem();
        mnBill_Admin = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        mnChangpass_Admin = new javax.swing.JMenuItem();
        mnSales_Manager = new javax.swing.JMenu();
        mnProduct_SalesManager = new javax.swing.JMenuItem();
        mnCategory_Salesmanager = new javax.swing.JMenuItem();
        mnSupplier_Salesmanager = new javax.swing.JMenuItem();
        mnBill_Salesmanager = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        mnChangpass_SalesManager = new javax.swing.JMenuItem();
        mnInventory_Magament = new javax.swing.JMenu();
        mnViewProduct_Inventoty = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        mnChangpass_Inventory = new javax.swing.JMenuItem();
        mnSales_person = new javax.swing.JMenu();
        mnViewProdut_Salesperson = new javax.swing.JMenuItem();
        jMenu4 = new javax.swing.JMenu();
        mnChangpass_Salesperson = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Banner7.jpg"))); // NOI18N

        javax.swing.GroupLayout jDesktopPane1Layout = new javax.swing.GroupLayout(jDesktopPane1);
        jDesktopPane1.setLayout(jDesktopPane1Layout);
        jDesktopPane1Layout.setHorizontalGroup(
            jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1107, Short.MAX_VALUE)
        );
        jDesktopPane1Layout.setVerticalGroup(
            jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 456, Short.MAX_VALUE)
        );

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jLabel2.setText("Hello !");

        lblChao.setText("+ UseName");

        jLabel4.setText("Your Roles :");

        lblRoles.setText("+Roles");

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Staff_10.png"))); // NOI18N

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/exit4.png"))); // NOI18N
        jButton1.setText("Logout");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(55, 55, 55)
                        .addComponent(jLabel3))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(45, 45, 45)
                        .addComponent(jButton1))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(jLabel2)))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblChao)
                            .addComponent(lblRoles))))
                .addContainerGap(51, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel3)
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblChao)
                    .addComponent(jLabel2))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(lblRoles))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jMenuBar1.setPreferredSize(new java.awt.Dimension(56, 50));

        mnHome.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Home.png"))); // NOI18N
        mnHome.setText("Home");

        jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/exit4.png"))); // NOI18N
        jMenuItem1.setText("Exit");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        mnHome.add(jMenuItem1);

        jMenuBar1.add(mnHome);

        mnAdmin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Admin.png"))); // NOI18N
        mnAdmin.setText("Administrator");

        mnStaff_Admin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/staff_2.gif"))); // NOI18N
        mnStaff_Admin.setText("Staff Manager");
        mnStaff_Admin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnStaff_AdminActionPerformed(evt);
            }
        });
        mnAdmin.add(mnStaff_Admin);

        mnProduct_Admin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Category_product.png"))); // NOI18N
        mnProduct_Admin.setText("Product Manager");
        mnProduct_Admin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnProduct_AdminActionPerformed(evt);
            }
        });
        mnAdmin.add(mnProduct_Admin);

        mnCategory_Admin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Category_product.png"))); // NOI18N
        mnCategory_Admin.setText("Category product Manager");
        mnCategory_Admin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnCategory_AdminActionPerformed(evt);
            }
        });
        mnAdmin.add(mnCategory_Admin);

        mnSupplier_Admin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Suplier.png"))); // NOI18N
        mnSupplier_Admin.setText("Supplier Manager");
        mnSupplier_Admin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnSupplier_AdminActionPerformed(evt);
            }
        });
        mnAdmin.add(mnSupplier_Admin);

        mnCustomer_Admin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Customer.png"))); // NOI18N
        mnCustomer_Admin.setText("Customer Manager");
        mnCustomer_Admin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnCustomer_AdminActionPerformed(evt);
            }
        });
        mnAdmin.add(mnCustomer_Admin);

        mnBill_Admin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Bill.png"))); // NOI18N
        mnBill_Admin.setText("Bill Manager");
        mnBill_Admin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnBill_AdminActionPerformed(evt);
            }
        });
        mnAdmin.add(mnBill_Admin);

        jMenu1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Changepas.png"))); // NOI18N
        jMenu1.setText("My account Manager");

        mnChangpass_Admin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/update_1.png"))); // NOI18N
        mnChangpass_Admin.setText("Change my pass");
        mnChangpass_Admin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnChangpass_AdminActionPerformed(evt);
            }
        });
        jMenu1.add(mnChangpass_Admin);

        mnAdmin.add(jMenu1);

        jMenuBar1.add(mnAdmin);

        mnSales_Manager.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Staff.png"))); // NOI18N
        mnSales_Manager.setText("Sales Manager");

        mnProduct_SalesManager.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Category_product.png"))); // NOI18N
        mnProduct_SalesManager.setText("Product Manager");
        mnProduct_SalesManager.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnProduct_SalesManagerActionPerformed(evt);
            }
        });
        mnSales_Manager.add(mnProduct_SalesManager);

        mnCategory_Salesmanager.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Category_product.png"))); // NOI18N
        mnCategory_Salesmanager.setText("Category product Manager");
        mnCategory_Salesmanager.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnCategory_SalesmanagerActionPerformed(evt);
            }
        });
        mnSales_Manager.add(mnCategory_Salesmanager);

        mnSupplier_Salesmanager.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Suplier.png"))); // NOI18N
        mnSupplier_Salesmanager.setText("Supplier Manager");
        mnSupplier_Salesmanager.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnSupplier_SalesmanagerActionPerformed(evt);
            }
        });
        mnSales_Manager.add(mnSupplier_Salesmanager);

        mnBill_Salesmanager.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Bill.png"))); // NOI18N
        mnBill_Salesmanager.setText("Bill Manager");
        mnBill_Salesmanager.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnBill_SalesmanagerActionPerformed(evt);
            }
        });
        mnSales_Manager.add(mnBill_Salesmanager);

        jMenu2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Changepas.png"))); // NOI18N
        jMenu2.setText("My account Manager");

        mnChangpass_SalesManager.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/update_1.png"))); // NOI18N
        mnChangpass_SalesManager.setText("Change my pass");
        mnChangpass_SalesManager.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnChangpass_SalesManagerActionPerformed(evt);
            }
        });
        jMenu2.add(mnChangpass_SalesManager);

        mnSales_Manager.add(jMenu2);

        jMenuBar1.add(mnSales_Manager);

        mnInventory_Magament.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Staff.png"))); // NOI18N
        mnInventory_Magament.setText("Inventory Manager");

        mnViewProduct_Inventoty.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Category_product.png"))); // NOI18N
        mnViewProduct_Inventoty.setText("View_Product");
        mnViewProduct_Inventoty.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnViewProduct_InventotyActionPerformed(evt);
            }
        });
        mnInventory_Magament.add(mnViewProduct_Inventoty);

        jMenu3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Changepas.png"))); // NOI18N
        jMenu3.setText("My account Manager");

        mnChangpass_Inventory.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/update_1.png"))); // NOI18N
        mnChangpass_Inventory.setText("Change my pass");
        mnChangpass_Inventory.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnChangpass_InventoryActionPerformed(evt);
            }
        });
        jMenu3.add(mnChangpass_Inventory);

        mnInventory_Magament.add(jMenu3);

        jMenuBar1.add(mnInventory_Magament);

        mnSales_person.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Staff.png"))); // NOI18N
        mnSales_person.setText("Sales Person");

        mnViewProdut_Salesperson.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Category_product.png"))); // NOI18N
        mnViewProdut_Salesperson.setText("View_Product");
        mnViewProdut_Salesperson.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnViewProdut_SalespersonActionPerformed(evt);
            }
        });
        mnSales_person.add(mnViewProdut_Salesperson);

        jMenu4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Changepas.png"))); // NOI18N
        jMenu4.setText("My account Manager");

        mnChangpass_Salesperson.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/update_1.png"))); // NOI18N
        mnChangpass_Salesperson.setText("Chang my pass");
        mnChangpass_Salesperson.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnChangpass_SalespersonActionPerformed(evt);
            }
        });
        jMenu4.add(mnChangpass_Salesperson);

        mnSales_person.add(jMenu4);

        jMenuBar1.add(mnSales_person);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 908, Short.MAX_VALUE))
            .addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel1, 0, 150, Short.MAX_VALUE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE)
                .addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void mnStaff_AdminActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnStaff_AdminActionPerformed
// TODO add your handling code here:
    Staff staff = new Staff();
    jDesktopPane1.add(staff);
    staff.show();
}//GEN-LAST:event_mnStaff_AdminActionPerformed

private void mnProduct_AdminActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnProduct_AdminActionPerformed
// TODO add your handling code here:
    Product_show product = new Product_show();
    jDesktopPane1.add(product);
    product.show();
}//GEN-LAST:event_mnProduct_AdminActionPerformed

private void mnCategory_AdminActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnCategory_AdminActionPerformed
// TODO add your handling code here:
    Product_CategoryShow category = new Product_CategoryShow();
    jDesktopPane1.add(category);
    category.show();
}//GEN-LAST:event_mnCategory_AdminActionPerformed

private void mnSupplier_AdminActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnSupplier_AdminActionPerformed
// TODO add your handling code here:
    Supplier_Show supplier = new Supplier_Show();
    jDesktopPane1.add(supplier);
    supplier.show();
}//GEN-LAST:event_mnSupplier_AdminActionPerformed

private void mnCustomer_AdminActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnCustomer_AdminActionPerformed
// TODO add your handling code here:
    Customer_Show customer = new Customer_Show();
    jDesktopPane1.add(customer);
    customer.show();
}//GEN-LAST:event_mnCustomer_AdminActionPerformed

private void mnBill_AdminActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnBill_AdminActionPerformed
// TODO add your handling code here:
    Bill bill = new Bill();
    jDesktopPane1.add(bill);
    bill.show();
}//GEN-LAST:event_mnBill_AdminActionPerformed

private void mnProduct_SalesManagerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnProduct_SalesManagerActionPerformed
// TODO add your handling code here:
    Product_show product_1 = new Product_show();
    jDesktopPane1.add(product_1);
    product_1.show();
}//GEN-LAST:event_mnProduct_SalesManagerActionPerformed

private void mnCategory_SalesmanagerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnCategory_SalesmanagerActionPerformed
// TODO add your handling code here:
    Product_CategoryShow category_1 = new Product_CategoryShow();
    jDesktopPane1.add(category_1);
    category_1.show();
}//GEN-LAST:event_mnCategory_SalesmanagerActionPerformed

private void mnSupplier_SalesmanagerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnSupplier_SalesmanagerActionPerformed
// TODO add your handling code here:
    Supplier_Show suppiler_1 = new Supplier_Show();
    jDesktopPane1.add(suppiler_1);
    suppiler_1.show();
}//GEN-LAST:event_mnSupplier_SalesmanagerActionPerformed

private void mnBill_SalesmanagerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnBill_SalesmanagerActionPerformed
// TODO add your handling code here:
    Bill bill_1 = new Bill();
    jDesktopPane1.add(bill_1);
    bill_1.show();
}//GEN-LAST:event_mnBill_SalesmanagerActionPerformed

private void mnViewProduct_InventotyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnViewProduct_InventotyActionPerformed
// TODO add your handling code here:
    View_Product_1 View = new View_Product_1();
    jDesktopPane1.add(View);
    View.show();
}//GEN-LAST:event_mnViewProduct_InventotyActionPerformed

private void mnViewProdut_SalespersonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnViewProdut_SalespersonActionPerformed
// TODO add your handling code here:
   
   View_Product_2 View = new View_Product_2(staffID);
    jDesktopPane1.add(View);
    View.show();
//    View_Product_2 View1 = new View_Product_2(staffID);
//    jDesktopPane1.add(View1);
//    View1.setVisible(true);
}//GEN-LAST:event_mnViewProdut_SalespersonActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
      this.dispose();
      new LogIn().setVisible(true);
}//GEN-LAST:event_jButton1ActionPerformed

private void mnChangpass_AdminActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnChangpass_AdminActionPerformed
// TODO add your handling code here:
    String UserName = userName;
    Change_pass chang_pass = new Change_pass();
    chang_pass.setVisible(true);
}//GEN-LAST:event_mnChangpass_AdminActionPerformed

private void mnChangpass_SalesManagerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnChangpass_SalesManagerActionPerformed
// TODO add your handling code here:
    Change_pass_3 chang_pass_3 = new Change_pass_3();
    chang_pass_3.setVisible(true);
}//GEN-LAST:event_mnChangpass_SalesManagerActionPerformed

private void mnChangpass_InventoryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnChangpass_InventoryActionPerformed
// TODO add your handling code here:
    Change_pass1 chang_pass_1 = new Change_pass1();
    chang_pass_1.setVisible(true);
}//GEN-LAST:event_mnChangpass_InventoryActionPerformed

private void mnChangpass_SalespersonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnChangpass_SalespersonActionPerformed
// TODO add your handling code here:
    Change_pass_2 chang_pass_2 = new Change_pass_2();
    chang_pass_2.setVisible(true);
}//GEN-LAST:event_mnChangpass_SalespersonActionPerformed

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
// TODO add your handling code here:
    System.exit(0);
}//GEN-LAST:event_jMenuItem1ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Main_Gui_1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Main_Gui_1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Main_Gui_1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Main_Gui_1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Main_Gui_1().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    protected javax.swing.JPanel jDesktopPane1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel lblChao;
    private javax.swing.JLabel lblRoles;
    private javax.swing.JMenu mnAdmin;
    private javax.swing.JMenuItem mnBill_Admin;
    private javax.swing.JMenuItem mnBill_Salesmanager;
    private javax.swing.JMenuItem mnCategory_Admin;
    private javax.swing.JMenuItem mnCategory_Salesmanager;
    private javax.swing.JMenuItem mnChangpass_Admin;
    private javax.swing.JMenuItem mnChangpass_Inventory;
    private javax.swing.JMenuItem mnChangpass_SalesManager;
    private javax.swing.JMenuItem mnChangpass_Salesperson;
    private javax.swing.JMenuItem mnCustomer_Admin;
    private javax.swing.JMenu mnHome;
    private javax.swing.JMenu mnInventory_Magament;
    private javax.swing.JMenuItem mnProduct_Admin;
    private javax.swing.JMenuItem mnProduct_SalesManager;
    private javax.swing.JMenu mnSales_Manager;
    private javax.swing.JMenu mnSales_person;
    private javax.swing.JMenuItem mnStaff_Admin;
    private javax.swing.JMenuItem mnSupplier_Admin;
    private javax.swing.JMenuItem mnSupplier_Salesmanager;
    private javax.swing.JMenuItem mnViewProduct_Inventoty;
    private javax.swing.JMenuItem mnViewProdut_Salesperson;
    // End of variables declaration//GEN-END:variables
}
